using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._IndoorsTools
{
    /// <summary>
    /// <para>Generate Unit Openings</para>
    /// <para>Creates unit openings as line features that model the location and physical extent of an entrance.</para>
    /// <para>将单元开口创建为线要素，用于对入口的位置和物理范围进行建模。</para>
    /// </summary>    
    [DisplayName("Generate Unit Openings")]
    public class GenerateUnitOpenings : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateUnitOpenings()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_unit_features">
        /// <para>Input Unit Features</para>
        /// <para>The input polygon features representing unit footprints for one or more facilities. In the Indoors model, this is the Units layer. The tool only processes the levels that contain the selected features.</para>
        /// <para>输入面要素表示一个或多个设施点的单位覆盖区。在 Indoors 模型中，这是 Units 图层。该工具仅处理包含所选要素的级别。</para>
        /// </param>
        /// <param name="_in_detail_features">
        /// <para>Input Detail Features</para>
        /// <para>The input polyline features representing the architectural detail polylines.</para>
        /// <para>表示建筑详图折线的输入折线要素。</para>
        /// </param>
        /// <param name="_door_detail_expression">
        /// <para>Door Detail Expression</para>
        /// <para>An SQL expression used to identify which detail polylines represent doors.</para>
        /// <para>用于标识哪些详图折线表示门的 SQL 表达式。</para>
        /// </param>
        /// <param name="_wall_detail_expression">
        /// <para>Wall Detail Expression</para>
        /// <para>An SQL expression used to identify which detail polylines represent walls.</para>
        /// <para>用于标识哪些详图折线表示墙的 SQL 表达式。</para>
        /// </param>
        /// <param name="_target_openings">
        /// <para>Target Openings</para>
        /// <para>The existing polyline feature class or feature layer to which generated polylines will be written. In the Indoors model this is the Details layer.</para>
        /// <para>将生成的折线写入的现有折线要素类或要素图层。在 Indoors 模型中，这是 Details 图层。</para>
        /// </param>
        public GenerateUnitOpenings(object _in_unit_features, object _in_detail_features, object _door_detail_expression, object _wall_detail_expression, object _target_openings)
        {
            this._in_unit_features = _in_unit_features;
            this._in_detail_features = _in_detail_features;
            this._door_detail_expression = _door_detail_expression;
            this._wall_detail_expression = _wall_detail_expression;
            this._target_openings = _target_openings;
        }
        public override string ToolboxName => "Indoors Tools";

        public override string ToolName => "Generate Unit Openings";

        public override string CallName => "indoors.GenerateUnitOpenings";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_unit_features, _in_detail_features, _door_detail_expression, _wall_detail_expression, _target_openings, _wall_thickness_tolerance, _delete_existing_openings.GetGPValue(), _updated_openings];

        /// <summary>
        /// <para>Input Unit Features</para>
        /// <para>The input polygon features representing unit footprints for one or more facilities. In the Indoors model, this is the Units layer. The tool only processes the levels that contain the selected features.</para>
        /// <para>输入面要素表示一个或多个设施点的单位覆盖区。在 Indoors 模型中，这是 Units 图层。该工具仅处理包含所选要素的级别。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Unit Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_unit_features { get; set; }


        /// <summary>
        /// <para>Input Detail Features</para>
        /// <para>The input polyline features representing the architectural detail polylines.</para>
        /// <para>表示建筑详图折线的输入折线要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Detail Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_detail_features { get; set; }


        /// <summary>
        /// <para>Door Detail Expression</para>
        /// <para>An SQL expression used to identify which detail polylines represent doors.</para>
        /// <para>用于标识哪些详图折线表示门的 SQL 表达式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Door Detail Expression")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _door_detail_expression { get; set; }


        /// <summary>
        /// <para>Wall Detail Expression</para>
        /// <para>An SQL expression used to identify which detail polylines represent walls.</para>
        /// <para>用于标识哪些详图折线表示墙的 SQL 表达式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Wall Detail Expression")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _wall_detail_expression { get; set; }


        /// <summary>
        /// <para>Target Openings</para>
        /// <para>The existing polyline feature class or feature layer to which generated polylines will be written. In the Indoors model this is the Details layer.</para>
        /// <para>将生成的折线写入的现有折线要素类或要素图层。在 Indoors 模型中，这是 Details 图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Openings")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_openings { get; set; }


        /// <summary>
        /// <para>Wall Thickness Tolerance</para>
        /// <para>The distance the tool will search inward and outward from the edge of a unit feature to find a door feature. The default unit of measurement is feet. The default value is 2 feet but can range from 0 to 6 feet.</para>
        /// <para>工具将从单元要素的边缘向内和向外搜索以查找门要素的距离。默认的测量单位是英尺。默认值为 2 英尺，但范围为 0 到 6 英尺。</para>
        /// <para>单位： Meters | Centimeters | Feet | Inches </para>
        /// </summary>
        [DisplayName("Wall Thickness Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _wall_thickness_tolerance { get; set; } = "2 Feet";


        /// <summary>
        /// <para>Delete Existing Openings</para>
        /// <para><xdoc>
        ///   <para>Specifies whether existing opening features with a USE_TYPE field value of Opening will be deleted before creating new opening features. If deleted, the tool will replace existing openings with new openings if they are at the same location.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Existing openings will be deleted.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Existing openings will not be deleted. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在创建新的打开要素之前，是否删除USE_TYPE字段值为“正在打开”的现有打开要素。如果删除，该工具将用新开口替换现有开口（如果它们位于同一位置）。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将删除现有空缺。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会删除现有空缺。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Delete Existing Openings")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _delete_existing_openings_value _delete_existing_openings { get; set; } = _delete_existing_openings_value._false;

        public enum _delete_existing_openings_value
        {
            /// <summary>
            /// <para>KEEP_EXISTING</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_EXISTING")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>DELETE_EXISTING</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DELETE_EXISTING")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Updated Openings</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Openings")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_openings { get; set; }


        public GenerateUnitOpenings SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}